Adwaita: style rich-list and data-table
authorJakub Steiner <jimmac@gmail.com>
Thu, 6 Aug 2020 09:55:04 +0000 (11:55 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 13 Aug 2020 20:30:22 +0000 (16:30 -0400)
- style special list types
- add navigation-sidebar too

https://gitlab.gnome.org/GNOME/gtk/-/issues/2929

gtk/theme/Adwaita/_common.scss

index cb4ba3968080719ac379bf01b6017c1782cefc76..3f7626e7a72d205d0a7dafe5f3a3690c1f6ce923 100644 (file)
@@ -3066,7 +3066,7 @@ separator {
  * Lists *
  *********/
 listview,
-list {
+list, .rich-list {
   color: $text_color;
   background-color: $base_color;
   border-color: $borders_color;
@@ -3120,6 +3120,25 @@ row {
   }
 }
 
+/********************************************************
+ * Data Tables                                          *
+ * treeview like tables with individual focusable cells *
+ * https://gitlab.gnome.org/GNOME/gtk/-/issues/2929     *
+ ********************************************************/
+
+  .data-table row:not(:selected) cell editablelabel:not(.editing):focus-within {
+    outline: 2px solid $focus_border_color;
+  }
+
+  .data-table row:not(:selected) cell editablelabel.editing:focus-within {
+    outline: 2px solid $selected_bg_color;
+  }
+
+  .data-table row:not(:selected) cell editablelabel.editing text selection {
+    color: $selected_fg_color;
+    background-color: $selected_bg_color;
+  }
+
 
 /*********************
  * App Notifications *
@@ -3361,7 +3380,10 @@ row image.sidebar-icon { opacity: $_placesidebar_icons_opacity; } // dim the sid
                                                                   // see bug #786613 for details 
                                                                   // on this oddity
 
-placessidebar {
+/* this should be more generic, only using .navigation-sidebar
+   https://gitlab.gnome.org/GNOME/gtk/-/issues/2929
+*/
+placessidebar, .navigation-sidebar {
   > scrolledwindow.frame { border-style: none; }
 
   row {